﻿using System;

namespace Bookworm.Core
{
    public sealed class EbookInfo : IEbookInfo
    {
        #region Fields

        private readonly SubtitleCollection _subtitles = new SubtitleCollection();
        private readonly AuthorCollection _authors = new AuthorCollection();
        private readonly CategoryCollection _categories = new CategoryCollection();
        private readonly TagCollection _tags = new TagCollection();
        private readonly LinkCollection _links = new LinkCollection();
        private readonly ImageCollection _images = new ImageCollection();

        #endregion

        #region Properties

        public string Title { get; set; }

        public SubtitleCollection Subtitles
        {
            get { return _subtitles; }
        }

        public string Description { get; set; }

        public AuthorCollection Authors
        {
            get { return _authors; }
        }

        public CategoryCollection Categories
        {
            get { return _categories; }
        }

        public TagCollection Tags
        {
            get { return _tags; }
        }

        public LinkCollection Links
        {
            get { return _links; }
        }

        public ImageCollection Images
        {
            get { return _images; }
        }

        public Format Format { get; set; }
        public string CustomFormat { get; set; }
        public int Rating { get; set; }
        public string Isbn10 { get; set; }
        public string Isbn13 { get; set; }
        public string Publisher { get; set; }
        public DateTime? PublishDate { get; set; }
        public string Language { get; set; }
        public int? PageCount { get; set; }

        #endregion
    }

    public enum Format
    {
        Html,
        Pdf,
        Xps,
        Doc,
        Other
    }

    public static class EbookRating
    {
        public const int Poor = 1;
        public const int Satisfactory = 2;
        public const int Average = 3;
        public const int Good = 4;
        public const int Excellent = 5;
    }
}